package inheima01;

public class Test {


    public static void main(String[] args) {

        Eatable e = new Cat();
        useEatable(e);

        useEatable(new Eatable() {
            @Override
            public String eat() {
                return "真难吃";
            }
        });

        useEatable(() -> {
            return "真难吃";
        });

    }

    public static void useEatable(Eatable e) {

        String relat = e.eat();
        System.out.println("eat方法返回值是" + relat);
    }
}
